{% extends 'users/base.html' %} {% block head %}
<title>登录页面</title>
{% endblock head %} {% block content %}

<div class="box" style="margin: 50px auto;max-width: 480px; padding: 50px;">
  <h1
    class="title"
    style="padding: 20px 0"
  >
    用户登录
  </h1>

  <form action="" method="post" novalidate>
    {% csrf_token %} 
    
    {{ form.as_p }}

    <div class="is-clearfix"></div>
    <a
      class="is-pulled-right"
      style="padding: 10px"
      href="{% url 'users:forget_pwd' %}"
    >
      忘记密码?
    </a>
    <input
      type="submit"
      style="margin-top: 1em"
      class="button is-link is-fullwidth"
      value="登 录"
    />
  </form>

  {% if messages %} {% for message in messages %}

  <div id="modal-js-example" class="modal is-active">
    <div class="modal-background"></div>

    <div class="modal-content">
      <div class="box">{{ message }}</div>
    </div>

    <button class="modal-close is-large" aria-label="close"></button>
  </div>

  {% endfor %} {% endif %}
</div>

{% endblock content %}
